<extend name="Common@Common:layui" />
<block name="title">
    <title>编辑用户信息</title>
</block>

<block name="main">
    <div class="layui-container" style="width:90%;">
        <form class="layui-form close-dialog layui-form-pane" action="/admin/user/edit_post" method="post" style="margin-top:20px;">
            <div class="layui-tab">

                <div class="layui-tab-content">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">用户名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="username" value="{$info.username}" placeholder="" lay-verify="required" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">角色：</label>
                            <div class="layui-input-block">
                                <select name="role" lay-verify="">
                                <option value="student" <if condition="$info['role'] eq 'student' ">selected</if>>学生</option>
                                <option value="parent" <if condition="$info['role'] eq 'parent' ">selected</if>>家长</option>
                                <option value="teacher" <if condition="$info['role'] eq 'teacher' ">selected</if>>教师</option>
                                <option value="admin" <if condition="$info['role'] eq 'admin' ">selected</if>>管理员</option>
                            </select>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">昵称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="nickname" value="{$info.nickname}" placeholder="" lay-verify="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">真实姓名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="realname" value="{$info.realname}" placeholder="" lay-verify="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">手机号：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="mobile" value="{$info.mobile}" placeholder="" lay-verify="required|phone" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">邮箱：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="email" value="{$info.email}" placeholder="" lay-verify="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">是否启用：</label>
                            <div class="layui-input-inline">
                                <input type="checkbox" name="status" value="1" lay-skin="switch" lay-text="启用|禁用" <if condition="$info['status'] eq 1">checked</if> >
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div style="color:red;">注：新建用户默认密码为“123456”</div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-inline">
                        <input type="hidden" name="id" value="{$info.id}">
                        <button lay-submit lay-filter="*" value="确认" class="layui-btn">提交</button>
                    </div>
                </div>
        </form>
        </div>
</block>